<?php
/**
 * @file testCache.php
 * @package DsCache
 * @subpackage 
 * @version $id: 0.1, utf8, Sat Dec  5 14:52:53 CST 2009
 * @author LD King <kldscs[at]gmail.com>
 * @copyright Copyleft (D.) 2007 - 2009 MiFunny China Inc.
 * @url http://mifunny.info/
 * @desc 
 *   测试 Cache.class.php
 * @ChangeLog
 * $id: ,
 *   
 */
require_once 'Cache.class.php';

$a = array( 'life_time' => 900, 'dir' => 'tmp', 'time'=>date('yy-MM-DD HH:mm:ss') );
$b = array( 'life_time' => null, 'abc' => 'abc' );

$a = array_merge($a, $b);
var_dump($a);


echo "<br />测试 Cache !<br/>\t\n";
define('DSCACHE_DIR', 'tmp');
define('DSCACHE_ENCODING', false);
define('DSCACHE_LIFE_TIME', 15);

$d = Cache::get('a', 5, 'bbq/ld');
if ( !$d ){
    Cache::set('a', $a, 5, 'bbq/ld');
    $d = $a;
}

var_dump($d);
//Cache::remove('a');
Cache::removeAll();

?>

